import {createStore,combineReducers,applyMiddleware} from 'redux'
import thunk from 'redux-thunk';

const loginReducer=(state={list:{isLogin:false,name:'',account:'',school:'',log:'登录',img:""}},action)=>{
    switch (action.type){
        case 'login':
            return {list:{isLogin:action.value,name:action.name,account:action.account,school:action.school,log:action.log,img:action.img},...state.list}
        case 'unlogin':
            return {list:{isLogin:action.value,name:action.name,log:action.log},...state.list}
        default:
            return state;
    }
}



const store=createStore(
    loginReducer,
)   
export default store;